package Drinks;

/**
 * @author ：wang-ting
 * @Date：2025/5/30 20:04
 */
import java.util.Scanner;
public class TestDrinks {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String brand;
        double alcoholicity,sugarcontent,milkcontent,juicecontent;
        brand = input.nextLine();
        alcoholicity = input.nextDouble();
        input.nextLine();
        Liquor liquor = new Liquor(brand,alcoholicity);
        brand = input.nextLine();
        sugarcontent = input.nextDouble();
        milkcontent = input.nextDouble();
        input.nextLine();
        Milktea milktea = new Milktea(brand,sugarcontent,milkcontent);
        brand = input.nextLine();
        sugarcontent = input.nextDouble();
        juicecontent = input.nextDouble();
        Fruitjuice fruitjuice = new Fruitjuice(brand,sugarcontent,juicecontent);
        showDrinksInfo(liquor);
        showDrinksInfo(milktea);
        showDrinksInfo(fruitjuice);
    }
    public static void showDrinksInfo(Drinks drinks){
        System.out.println(drinks.advertisement());
        System.out.println(drinks.component());
    }
}
